/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, middleware } = app;
  router.get('获取字典列表', '/dictionary/list', middleware.jwt(), controller.home.list);
  router.get('获取字典树', '/dictionary/tree', middleware.jwt(), controller.home.tree);
  router.post('新增字典', '/dictionary/insert', middleware.jwt(), controller.home.insert);
  router.post('更新字典', '/dictionary/update', middleware.jwt(), controller.home.update);
  router.post('开启关闭', '/dictionary/enable', middleware.jwt(), controller.home.enable);
  router.post('移动', '/dictionary/move', middleware.jwt(), controller.home.move);
  router.post('删除', '/dictionary/delete', middleware.jwt(), controller.home.delete);
};
